/*
 * @Descripttion:
 * @version:
 * @Author: ChenXiang
 * @Date: 2021-08-01 16:52:23
 * @LastEditors: ChenXiang
 * @LastEditTime: 2021-08-04 15:53:36
 */
import React from "react";
import { Link, Route, BrowserRouter as Router } from "../../components";
const HomePage = () => <h1>Home</h1>;
const UsersPage = () => <h1>User</h1>;
const App = () => (
  <div className="primary-layout">
    <Router>
      <header>Our React Router 4 App</header>
      <ul>
        <li>
          <Link to="/home">Home</Link>
        </li>
        <li>
          <Link to="/user">User</Link>
        </li>
      </ul>
      {/* <Switch> */}
      <Route path="/home" exact component={HomePage} />
      <Route path="/user" component={UsersPage} />
      {/* </Switch> */}
    </Router>
  </div>
);

export default App;

// /*
//  * @Descripttion:
//  * @version:
//  * @Author: ChenXiang
//  * @Date: 2021-08-01 16:54:44
//  * @LastEditors: ChenXiang
//  * @LastEditTime: 2021-08-01 17:43:55
//  */
// // 渲染出来组件即可
// import React from "react";
// import Router from './BrowserRouter.js'
// import Route from './Router.js'

// export default class BrowserRouter extends React.Component {
//     constructor(props) {
//         super(props);
//         this.state = {

//         }
//     }
//     render() {
//         return (
//             <div>

//                 <Router>
//                     {/* <Route />
//                     <Route components={() => <p>2222</p>} /> */}
//                 </Router>
//             </div>
//         )
//     }
// }
